<template>
  <div>
    <table border="6" align="center">
      <tr>
        <td>姓名</td>
        <td>操作</td>
      </tr>
      <tr v-for="i in list">
        <td>{{ i.username }}</td>
      </tr>
    </table>
  </div>
</template>

<script>
export default {
  name: "showT",
  data() {
    return {
      list: []
    }
  },

  methods: {
    btn() {
      this.axios.get('teacher/').then(res => {
        this.list = res.data
      })
    }
  },

  mounted() {
    this.btn()
  }
}
</script>

<style scoped>

</style>
